package com.only4play.pcc.mapper;

import com.only4play.pcc.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liyuncong
 * @version 1.0
 * @file LikeMapper
 * @brief LikeMapper
 * @details LikeMapper
 * @date 2024-06-24
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-06-24               liyuncong          Created
 */

@Mapper
public interface LikeMapper {

    Long islike(@Param("oid") Long oid, @Param("uid") Long uid);

    Long like(@Param("oid") Long oid, @Param("uid") Long uid);

    List<User> queryLatestLikeUsers(@Param("oid") Long oid, @Param("queryLimit") int defaultLimit);

    Long unlike(@Param("oid") Long oid, @Param("uid") Long uid);

    Long count(@Param("oid") Long oid);

    List<User> list(@Param("oid") Long oid, @Param("cursor") Long cursor, @Param("limitSize") Integer limit);
}
